package algorithm;



import javafx.util.Pair;

import java.math.BigInteger;
import java.util.Scanner;

/**
 * create by yongli on 2021-02-28 11:31
 */

public class BigNumberOperation {
    public static void main(String[] args) {

        BigInteger a = new BigInteger("123333333333333");
        BigInteger b = new BigInteger(232+"");
        long a11 = 2<<32;
        double a111 = Math.pow(2,64);
        System.out.println(a111);

    }

    public static  void  divide(String big,int small,StringBuffer res){
        int len = String.valueOf(small).length();
        if(len >= big.length()-1){
            int bigInt = Integer.valueOf(big);
            int res1 = bigInt / small;
            res.append(res1);
            return;
        }
        String str = big.substring(0,len);
        int strInt = Integer.valueOf(str);
        if(strInt < small){
            divide(big,small,res);
        }else {
            int res1 = strInt / small;
            res.append(res1);
            int gcd = strInt % small;
            String sb = big.substring(len);
            big = gcd + sb;
            divide(big,small,res);
        }

    }

    public static  String  divideSmart(String big,int small){
        int r =0;
        int len = big.length();
        StringBuffer res =new StringBuffer();
        for(int i=0;i<len;i++){
            int sum = 10*r + Integer.valueOf(big.substring(i,i+1));
            int q= sum / small;
            r = sum % small;
            res.append(q);
        }

        String s = new String(res);
        for(int i=0;i<len;i++){
            if(!s.substring(i,i+1).equals("0")){
                s = s.substring(i);
                return s;
            }
        }
        return "0";
    }
}
